A language-independent static checking system for coding conventions
نویسنده
چکیده
Despite decades of research aiming to ameliorate the difficulties of creating software, programming still remains an error-prone task. Much work in Computer Science deals with the problem of specification, or writing the right program, rather than the complementary problem of implementation, or writing the program right. However, many desirable software properties (such as portability) are obtained via adherence to coding standards, and therefore fall outside the remit of formal specification and automatic verification. Moreover, code inspections and manual detection of standards violations are time consuming. To address these issues, this thesis describes Exstatic, a novel framework for the static detection of coding standards violations. Unlike many other static checkers Exstatic can be used to examine code in a variety of languages, including program code, in-line documentation, markup languages and so on. This means that checkable coding standards adhered to by a particular project or institution can be handled by a single tool. Consequently, a major challenge in the design of Exstatic has been to invent a way of representing code from a variety of source languages. Therefore, this thesis describes ICODE, which is an intermediate language suitable for representing code from a number of different programming paradigms. To iii substantiate the claim that ICODE is a universal intermediate language, a proof strategy has been developed: for a number of different programming paradigms (imperative, declarative, etc.), a proof is constructed to show that semantics-preserving translation exists from an exemplar language (such as IMP or PCF) to ICODE. The usefulness of Exstatic has been demonstrated by the implementation of a number of static analysers for different languages. This includes a checker for technical documentation written in Javadoc which validates documents against the Sun Microsystems (now Oracle) Coding Conventions and a checker for HTML pages against a site-specific standard. A third system is targeted at a variant of the Python language, written by the author, called python-csp, based on Hoare’s Communicating Sequential Processes.
منابع مشابه
Explicit Support for Software Development Styles throughout the Complete Life Cycle
Throughout its entire life cycle software development is subject to many rules constraining and guiding construction of software systems. Examples are best-practice patterns, idioms, coding conventions, design guidelines, architectural patterns, etc. Although such regulations are widely used, their usage is currently implicit or ad-hoc, and most software development environments do not explicit...
متن کاملA Static Aspect Language for Modelica Models
With the introduction of the new Modelica major version 3, innovations mainly consist of further model restrictions for increased model quality. In addition, developers often want to ensure the compliance to further requirements early in the development cycle. Mostly emerging as domain specific conventions that often crosscut model structures, according checking mechanisms are required that are...
متن کاملA Hybrid Meta-heuristic Approach to Cope with State Space Explosion in Model Checking Technique for Deadlock Freeness
Model checking is an automatic technique for software verification through which all reachable states are generated from an initial state to finding errors and desirable patterns. In the model checking approach, the behavior and structure of system should be modeled. Graph transformation system is a graphical formal modeling language to specify and model the system. However, modeling of large s...
متن کاملLingua Franca : An IDL for Structural Subtyping DistributedObject
Recently the trend has been towards applying object-oriented techniques to address problems of building scalable and maintainable distributed systems. Object-oriented programming increases modularity and data abstraction by supporting encapsulation through narrow, rigidly deened and strongly enforced interfaces to objects. Unfortunately, object-oriented interfaces and mechanisms are usually onl...
متن کاملStatic Analysis of Code Binaries for Safe Software Reuse
In this paper we consider reusability of software component binaries. Reuse of code at the binary level is important because usually only the machine code for system components is available; vendors do not want to share their source code for proprietary reasons. We develop necessary and sufficient conditions for ensuring that software binaries are reusable and relate them to the coding standard...
متن کامل